<?php
class IndexAction extends CommonAction{
	/**
	+----------------------------------------------------------
	* 默认操作
	+----------------------------------------------------------
	*/
	public function index(){
		$domain	= getdomain();
		$model	= M("com");
		$vo		= $model->field("*")->getByDomain($domain);
		dump($vo);
	}

	public function about(){
		echo "about";
	}

	public function dealdomain(){
		$model	= M("com");
		$domains	= $model->field("id,domain,comname")->where("domain = ''")->limit("10")->select();
		foreach($domains as $vo){
			$str		= iconv("UTF-8", "GB2312",$vo["comname"]);
			$domain	= ch2en($str,0);
			$model->where("id=".$vo["id"])->setField("domain",$domain);
			echo "<br>" . $model->getLastsql() ;
		}
		dump($domains);
	}

}
?>